class Solution(object):
    def findLadders(self, beginWord, endWord, wordList):
        """
        :type beginWord: str
        :type endWord: str
        :type wordList: List[str]
        :rtype: List[List[str]]
        """

        word_set = set(wordList)
        if beginWord not in word_set or endWord not in word_set:
            return []
        if len(word_set) != len(wordList):
            return []


        pre_word_list = {}
        for word in wordList:
            for
